package com.jiecao.news.jiecaonews;

import com.jiecao.news.jiecaonews.service.StartService;
import com.jiecao.news.jiecaonews.util.AlarmUtil;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootCompletedReceiver extends BroadcastReceiver  {
	private String TAG = "BootCompletedReceiver";
	@Override     
	public void onReceive(Context context, Intent intent)      {
		Log.i("MainActivity", "系统启动完毕"); 
		// 取消定时器（这里面会关闭service）
		AlarmUtil.stopAlarm(StartService.class,context);
		// 启动定时器
		AlarmUtil.startAlarm( StartService.class,context);
		}

}
